package com.bwie.controller;

import com.bwie.service.UserService;
import com.bwie.utils.R;
import com.bwie.vo.LoginInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * TODO
 *
 * @Description
 * @Author 36167
 * @Date 2025/3/19 9:41
 **/


@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping("/login")
    public R login(LoginInfoVo loginInfoVo){
        return userService.login(loginInfoVo);
    }

    @PostMapping("/getuser/{id}")
    public R getuser(@PathVariable Integer id){
        return userService.getuser(id);
    }

}
